<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:template match="/">
		<!--	
			Parser for URL : http://fin.seb.lt/vbfin/currency/currencyList.fw?s_menu=4
		-->
		<tns:rates xmlns:tns="http://www.currencyrates.com/Currency" 
			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
			xsi:schemaLocation="http://www.currencyrates.com/Currency Currency.xsd">
			<xsl:for-each select="//table[@class='tbln']/tr">
				<xsl:if test="position() > 3">
					<tns:rate>
						<tns:currency><xsl:value-of select="./td[2]"/></tns:currency>
						<tns:amount><xsl:value-of select="./td[3]"/></tns:amount>
						<tns:buy><xsl:value-of select="translate(./td[9], ',', '.')"/></tns:buy>
						<tns:sell><xsl:value-of select="translate(./td[11], ',', '.')"/></tns:sell>
						<tns:date>
							<xsl:value-of select="substring(/html/body/table/tr/td/table/tr[2]/td, 12, 4)"/><xsl:text>-</xsl:text>
							<xsl:value-of select="substring(/html/body/table/tr/td/table/tr[2]/td, 17, 2)"/><xsl:text>-</xsl:text>
							<xsl:value-of select="substring(/html/body/table/tr/td/table/tr[2]/td, 20, 2)"/><xsl:text>T</xsl:text>
							<xsl:value-of select="substring(/html/body/table/tr/td/table/tr[2]/td, 23, 7)"/><xsl:text>:00</xsl:text>						
						</tns:date>
						<tns:bank>seb</tns:bank>
					</tns:rate>
				</xsl:if>	
			</xsl:for-each>
		</tns:rates>		
	</xsl:template>
</xsl:stylesheet>